﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAAC.DTO;
using SAAC.DAL;

namespace SAAC.BLL
{
    public class ColegiadoBLL
    {
        protected ColegiadoDAL _colegiadoDAL;

        public ColegiadoBLL()
        {
            if (_colegiadoDAL == null)
                _colegiadoDAL = new ColegiadoDAL();
        }

        public ColegiadoDTO Select(ColegiadoDTO dto, string order = null)
        {
            try
            {
                return _colegiadoDAL.Select(dto, order);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public List<ColegiadoDTO> SelectAll(ColegiadoDTO dto, string order = null, int limit = 1000)
        {
            try
            {
                return _colegiadoDAL.SelectAll(dto, order, limit);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Insert(ColegiadoDTO dto)
        {
            try
            {
                _colegiadoDAL.Insert(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Update(ColegiadoDTO dto)
        {
            try
            {
                _colegiadoDAL.Update(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void Delete(ColegiadoDTO dto)
        {
            try
            {
                _colegiadoDAL.Delete(dto);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        

    }
}
